package io.renren.modules.substation.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.substation.dao.TPpRegInfoDao;
import io.renren.modules.substation.entity.TPpRegInfoEntity;
import io.renren.modules.substation.service.TPpRegInfoService;


@Service("tPpRegInfoService")
public class TPpRegInfoServiceImpl extends ServiceImpl<TPpRegInfoDao, TPpRegInfoEntity> implements TPpRegInfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TPpRegInfoEntity> page = this.page(
                new Query<TPpRegInfoEntity>().getPage(params),
                new QueryWrapper<TPpRegInfoEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public int updateByAdd(TPpRegInfoEntity tPpRegInfoEntity){
        return baseMapper.updateByAdd(tPpRegInfoEntity);
    }

    public TPpRegInfoEntity queryRegInfoByCondition(TPpRegInfoEntity tPpRegInfoEntity){
        return baseMapper.queryRegInfoByCondition(tPpRegInfoEntity);
    }
}